package com.downguys.domain.enums;

/**
 * @author xiyang.qiao
 * @date 2017/1/3 - 20:15
 */
public enum PassportStatus implements IEnum{

    /**
     * <p>正常
     */
    AVAILABLE(0),

    /**
     * <p>冻结
     */
    CONGEAL(1),

    /**
     * <p>账户异常
     */
    ILLEGAL_STATE(2);

    private final int value;
    private PassportStatus(int value){
        this.value = value;
    }

    public int getValue() {
        return value;
    }


    public static PassportStatus findByValue(int value){

        switch(value){

            case 0: return AVAILABLE;
            case 1: return CONGEAL;
            case 2: return ILLEGAL_STATE;

            default: return null;

        }

    }
}
